package cn.iocoder.yudao.framework.mq.rocketmq.core.config;

import cn.iocoder.yudao.framework.mq.rocketmq.api.producer.service.ProducerMQService;
import cn.iocoder.yudao.framework.mq.rocketmq.core.producer.service.impl.ProducerMQServiceImpl;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;


/**
 * @author guan
 * @Description:
 * @Date 2023/9/12 13:19
 */
@AutoConfiguration
@ConditionalOnClass(name = "org.apache.rocketmq.spring.core.RocketMQTemplate")
@Import({RocketMQEnhanceAutoConfiguration.class, RocketMQTopicConfiguration.class})
@Log4j2
public class RocketmqBeanAutoConfiguration {
    public RocketmqBeanAutoConfiguration() {
        log.info("初始化 RocketmqBeanAutoConfiguration");
    }

    @Bean
    public ProducerMQService producerMQService() {
        return new ProducerMQServiceImpl();
    }



}
